package ch2;

import java.util.Scanner;

public class Ex19 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("输入三角形的三个点(x1,y1)(x2,y2)(x3,y3):");
        double x1 = in.nextDouble();
        double y1 = in.nextDouble();
        double x2 = in.nextDouble();
        double y2 = in.nextDouble();
        double x3 = in.nextDouble();
        double y3 = in.nextDouble();
        double s = (x1 + x2 + x3) / 2;
        double mj = s * (s - y1) * (s - y2) * (s - y3);
        System.out.println("面积是：" + mj);
    }
}
